/**
 * Project Name:sc-parent-service
 * File Name:ProbabilityCalculatorFactory.java
 * Package Name:com.sc.probabilityfactory
 * Date:2018年6月29日上午9:32:43
 * Copyright (c) 2018, bluemobi All Rights Reserved.
 */

package com.sc.probabilitycount;

import java.util.ArrayList;
import java.util.List;

import com.sc.probability.Probability;
import com.sc.probabilityfactory.ProbabilityFactory;

/**
 * Description:   <br/>
 * Date:     2018年6月29日 上午9:32:43 <br/>
 * @author   tianyongxu
 * @version
 * @see
 */
public class ProbabilityCalculatorFactory {
    /**
     * 根据不容的常量来计算不容的概率值 装进list集合
     * */
    public ProbabilityCalculator createProbabilityCalculator(){
        
       /* try {
            Class<Probability> clazz = (Class<Probability>) Class.forName("com.sc.probability.impl.HasHouseCountProbabilityImpl");
            Probability probability= clazz.getConstructor().newInstance();            
        } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
            e.printStackTrace();
        }*/
        
        //
       
        List<Probability> list = new ArrayList<>();
        list.add(ProbabilityFactory.createProbability(ProbabilityFactory.AGE));//调年龄的概率值
        list.add(ProbabilityFactory.createProbability(ProbabilityFactory.ANNUALINCOME));//调年收入的概率值
        list.add(ProbabilityFactory.createProbability(ProbabilityFactory.GENDER));//调性别的概率值
        list.add(ProbabilityFactory.createProbability(ProbabilityFactory.HASHOUSECOUNT));//调有房的概率值
        list.add(ProbabilityFactory.createProbability(ProbabilityFactory.MONEY));//调目标金额的概率值
        
        return new ProbabilityCalculator(list);
    }
}

